package com.qq.oauth.resource.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @PreAuthorize(value = "hasAuthority('ROLE_p1')")
    @RequestMapping("gp/gp1")
    public String query1(){
        return "resources:query1";
    }



    @PreAuthorize(value = "hasAuthority('ROLE_p1')")
    @RequestMapping("gp/gp2")
    public String query2(){
        return "resources:query2";
    }
}
